package com.liusand.mapper;

import com.liusand.dto.ShoppingCartDto;
import com.liusand.pojo.ShoppingCart;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author :liusha
 * packageName :com.liusand.mapper
 * fileName :ShoppingCartMapper
 * creationTime :2022/12/1 21:18
 */
@Mapper
public interface ShoppingCartMapper {
    List<ShoppingCart> list(@Param("userId") String userId);

    int insertDishOrSetmealToShoppingCart(@Param("shoppingCart")ShoppingCart shoppingCart);

    ShoppingCart selectShoppingCart(@Param("shoppingCart") ShoppingCart shoppingCart);

    int updateNumberInShoppingCart(@Param("shoppingCart") ShoppingCart shoppingCart);

    int deleteAllShoppingCartByUserId(@Param("id") String id);

    List<ShoppingCart> selectShoppingCartByUserId(@Param("userId") String userId);

    int deleteShoppingCart(@Param("id") String id);
}
